package com.sky.earnmoney.api;

import com.sky.earnmoney.GoodsDetail;
import com.sky.earnmoney.GoodsListInfo;
import com.sky.earnmoney.bean.IndexData;

import java.util.HashMap;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.QueryMap;

/**
 * @author: xuzhiyong
 * @date: 2022/1/26  下午11:26
 * @Email: 18971269648@163.com
 * @description:
 */
public interface Api {

    @FormUrlEncoded
    @POST("/api/weixin/checklogin")
    Call<HttpResult<String>> checkLogin(@FieldMap HashMap<String,Object> param);

    @FormUrlEncoded
    @POST("/api/index/index")
    Call<HttpResult<IndexData>> indexData(@FieldMap HashMap<String,Object> param);

    //获取列表
    @FormUrlEncoded
    @POST("/api/index/getGoodsList")
    Call<GoodsListInfo> getGoodsList(@FieldMap HashMap<String,Object> param);

    //获取详情信息
    @FormUrlEncoded
    @POST("/api/index/getGoodsInfo")
    Call<GoodsDetail> getGoodsInfo(@FieldMap HashMap<String,Object> param);

    //发起抢单  ** 改为对应的地址，GetParam里面构造对应的请求参数
    @FormUrlEncoded
    @POST("/api/seckill/goods")
    Call<HttpResult<Object>> request(@FieldMap HashMap<String,Object> param);

}
